//
//  DataHelper.h
//  WeddingApp
//
//  Created by toannt on 12/5/12.
//
//

#import <Foundation/Foundation.h>
#import "CALDiaryInfo.h"
#import "CALFood.h"
#import "CALEating.h"

@interface DataHelper : NSObject
+ (DataHelper *)sharedDatabase;
+ (void)copyDatabase;

- (NSMutableArray *)getFoodsListInDate:(NSString *)date;

- (BOOL)addEatingWithName:(NSString *)name time:(NSString *)time date:(NSString *)date;

- (NSMutableArray *)getFoodsWithEatingId:(NSInteger)eatingId;
- (NSMutableArray *)getAllFoods;
- (BOOL)updateFood:(CALFood *)food eatingId:(NSInteger)eatingId;
- (BOOL)addWeight:(float) weight inTime:(NSDate *)time;
- (BOOL)addMeasurement:(float) hipSize WaistInfo:(float) waistSize NeckCircumInfo:(float) neckCircum inTime:(NSDate *)time;
- (CALDiaryInfo *)getDiaryInfoByDate:(NSDate *)date;
- (NSMutableArray *)getDiaryInfomation;
- (double)getCalsInDate:(NSString *)date;
- (BOOL)updateHipSize:(double)hs waistSize:(double)ws neckSize:(double)ns inDate:(NSString *)date;
- (BOOL)deleteFood:(CALFood *)food;
- (BOOL)deleteFood:(CALFood *)food eatingId:(NSInteger)eatingId;
- (BOOL)deleteEatingWithId:(NSInteger)eatingId;
- (BOOL)addNewFood:(CALFood *)newFood;
- (CALFood *)getFoodWithName:(NSString *)foodName;
- (BOOL)updateExistEating:(CALEating *)eating;
- (double)getFoodCalUnit:(NSInteger)foodId;
- (BOOL)updateFoodAmount:(CALFood *)food eatingId:(NSInteger)eatingId;
@end
